import 'package:mvvm_provider/model/response_model.dart';
import 'package:mvvm_provider/net/http_config.dart';
import 'package:mvvm_provider/net/ltt_https.dart';
import 'package:mvvm_provider/page/mine/data/repository/mine_api.dart';

class MineRepository {
  static Future<ResponseModel> getInfoListData<T>(int pageNum) async {
    Map<String, dynamic> params = {"pn": pageNum, "ps": 20, "q": "车讯原创", "t": 0};
    ResponseModel responseModel =
        await LttHttp().request<T>(MineApi.searchURL, params: params, method: HttpConfig.get);
    return responseModel;
  }

  static Future<ResponseModel> getDetailInfoData<T>(int entityId) async {
    Map<String, dynamic> params = {"entityId": entityId};
    ResponseModel responseModel =
        await LttHttp().request<T>(MineApi.infoURL, params: params, method: HttpConfig.get);
    return responseModel;
  }
}
